Various types of motor controllers are used to control motors. Motor controllers may drive the motor by providing power to motor coils within the motor in various sequences in order to control operation of the motor. Simple control of a motor includes starting, stopping, and reversing direction of a motor. However, many motor applications require more sophisticated control over motors. For example, a camera lens having an auto-focus mechanism may require precise timing and positioning of the motor during focusing operations. Such systems may also require that the motor is controlled in different ways depending upon the circumstances. For example, a camera designer may want the focusing motor for a camera lens to behave one way when the camera is used to take still pictures, and another way when the camera is used to take videos.
In systems that require complex or precise motor control, motor controllers may employ more complex control algorithms to provide greater control over motor movement. For example, Proportional-Integrator-Differential (PID) controllers combine a signal representing the current position of the motor, with a signal representing the integral of the position of the motor, and a signal representing the differential of the position of the motor, in order to provide fine control over the motor as the motor moves. The function of such algorithmic controllers can be fine tuned with coefficients, e.g. constant data values that become part of the equation for controlling the motor.